package com.darren.archive.consumer1.service;


import com.darren.archive.consumer1.controller.EchoController;

import java.util.logging.Logger;

public class EchoServiceFallback implements EchoService {


    Logger logger = Logger.getLogger(EchoServiceFallback.class.getName());

    @Override
    public String echo(String message) {
        logger.info(this.throwable.getMessage());
        return "delay degrade by sentinel";
    }

    private Throwable throwable;

    EchoServiceFallback(Throwable throwable) {
        this.throwable = throwable;
    }


}
